<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>


        // 当函数没有写return 的时候，函数默认的返回值是undefined


        var a = console.log(666) ;
        console.log(a) ;   // undefined

        function fn() {
            var a = 5 ;
            a++ ;
        }

        var res = fn() ;

        console.log(res) ;  // undefined

    </script>
    
</body>
</html>